<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>bb</title>
</head>
<body>
<script>

    window.onmessage=function (e) {
        console.log(e.data);
        e.source.postMessage('我来自b页面',e.origin)
    }
</script>
</body>
</html>